﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="NewsList.ascx.cs" Inherits="BackEnd_NewsList" %>
<table id="Table2" cellspacing="1" cellpadding="1" width="100%" border="0">
    <tr>
        <td class="toolbar" width="100%">
            <table cellspacing="1" cellpadding="1" style="width: 800px; height: 20px">
                <tr>
                    <td>
                        <b>
                            <%=this.url%>
                            Tin tức -> các nội dung </b>
                    </td>
                    <td align="left" style="width: 94px">
                        <a href="<%=_Url%>">
                            <img src="Images/Admin/ico_update.gif" border="0">
                            Thêm mới</a>
                    </td>
                    <td align="right" style="width: 94px">
                         <img src="Images/Admin/ico_delete.gif" border="0">
                        <asp:LinkButton ID="btnDelete" runat="server" OnClick="Delete" Text="Delete"></asp:LinkButton>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr style="text-align: left">
        <td align="center" colspan="4">
            <asp:Label ID="labMessage" runat="server" Width="100%" ForeColor="Red" Font-Bold="True"></asp:Label>
        </td>
    </tr>
    <tr>
        <td align="left"><%--AutoGenerateDeleteButton="True"                OnRowDeleting="grid_RowDeleting"--%>
            <asp:GridView runat="server" ShowHeader="true" ID="grid" BorderColor="#CC9966" BorderStyle="None"
                BorderWidth="1px" RowStyle-BorderWidth="0" RowStyle-BorderStyle="None" Width="100%"
                AlternatingRowStyle-BackColor="#f8f8f8" AlternatingRowStyle-BorderColor="#f8f8f8"
                AutoGenerateEditButton="true" OnRowEditing="grid_RowEditing" OnRowUpdating="grid_RowUpdating"
                HeaderStyle-BackColor="#F1F1F1" CellPadding="4" AutoGenerateColumns="False"  AllowSorting="True" BackColor="White" ShowFooter="True"
                AllowPaging="True" OnPageIndexChanging="grid_PageIndexChanging" PageSize="20">
                <Columns>
                   <asp:TemplateField HeaderText="<a href='#' onclick='javascript:CheckAll()'>Chọn</a>/<a href='#' onclick='javascript:UnCheckAll()'>Bỏ chọn</a>">
                        <ItemTemplate>
                             <input type="checkbox" name="check<%#Eval(Component.ColumNews._Id)%>" value="<%#Eval(Component.ColumNews._Id)%>"
                                    onclick="check_Click">
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Tiêu đề">
                        <ItemTemplate>
                            <a href="<%#Eval(Component.ColumNews._UrlDetailBackend)%>" title="Chi tiết tin tức">
                                <%#Eval(Component.ColumNews._Titile) %>
                            </a>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:TextBox runat="server" ID="txtTitile" Text='<%#Eval(Component.ColumNews._Titile)%>'
                                TextMode="MultiLine" Width="500px" />
                        </EditItemTemplate>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Kích hoạt">
                        <ItemTemplate>
                            <%#Eval(Component.ColumNews._Active)%>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:DropDownList ID="ddLAct" runat="server">
                                <asp:ListItem>true</asp:ListItem>
                                <asp:ListItem>false</asp:ListItem>
                            </asp:DropDownList>
                        </EditItemTemplate>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:TemplateField>
                     <asp:TemplateField>
                        <ItemTemplate>
                            <a href="<%#Eval(Component.ColumNews._UrlDetailBackend)%>" title="Chi tiết tin tức">
                                Cập nhật tổng quát
                            </a>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <RowStyle BorderStyle="None" BorderWidth="0px" />
                <HeaderStyle BackColor="#F1F1F1" />
                <AlternatingRowStyle BackColor="#F8F8F8" BorderColor="#F8F8F8" />
            </asp:GridView>
        </td>
    </tr>
</table>
